﻿using System.ComponentModel;
using System.Windows.Input;
#if SILVERLIGHT
using System.Windows;
using System.Windows.Controls;
#else
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
#endif


namespace Microsoft.PlayerFramework
{
    /// <summary>
    /// A control that indicates an error has occured.
    /// </summary>
    public class ErrorView : Control
    {
        /// <summary>
        /// Creates a new instance of the control
        /// </summary>
        public ErrorView()
        {
            this.DefaultStyleKey = typeof(ErrorView);
        }

        #region Command
        /// <summary>
        /// Identifies the RetryCommand dependency property.
        /// </summary>
        public static readonly DependencyProperty RetryCommandProperty = DependencyProperty.Register("RetryCommand", typeof(ICommand), typeof(ErrorView), null);

        /// <summary>
        /// Gets or sets the command used to retry after the error occured.
        /// </summary>
        public ICommand RetryCommand
        {
            get { return (ICommand)GetValue(RetryCommandProperty); }
            set { SetValue(RetryCommandProperty, value); }
        }
        #endregion

    }
}
